﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_SearchTaiSanCoDinh : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CboBophansudung")]
        private ComboBox _CboBophansudung;
        [AccessedThroughProperty("CboLoaiTaiSan")]
        private ComboBox _CboLoaiTaiSan;
        [AccessedThroughProperty("CboViTriLoaiTaiSan")]
        private ComboBox _CboViTriLoaiTaiSan;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdRefresh")]
        private ToolStripButton _CmdRefresh;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        public string cFrmKhoa;
        private IContainer components;
        private bool IsLoad;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private DataView objData;
        public object objFrmCall;
        public object objFrmSoDuDauKy;
        private clsTaiSanCoDinh objSTSCD;
        public string pNamThang;

        public Frm_SearchTaiSanCoDinh()
        {
            base.Load += new EventHandler(this.Frm_SearchTaiSanCoDinh_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mAllowView = false;
            this.mAllowDel = false;
            this.mAllowEdit = false;
            this.objSTSCD = new clsTaiSanCoDinh();
            this.pNamThang = "";
            this.cFrmKhoa = "";
            this.IsLoad = true;
            this.InitializeComponent();
        }

        private void CboBophansudung_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CboLoaiTaiSan_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CboViTriLoaiTaiSan_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if (((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0)) && (LVYModule.ConfirmDelete("") && this.objSTSCD.DelData(Conversions.ToString(this.VSlist[this.VSlist.Row, 0]))))
            {
                this.VSlist.RemoveItem(this.VSlist.Row);
            }
        }

        private void CmdPrint_Click(object sender, EventArgs e)
        {
            this.cFrmKhoa = Conversions.ToString(this.VSlist[this.VSlist.Row, 0]);
            if (this.cFrmKhoa.ToString().Trim() != "")
            {
                this.Cursor = Cursors.WaitCursor;
                DataTable dataTable = this.objSTSCD.ShowListByField("", " Khoa='" + this.cFrmKhoa + "'", "");
                Rpt_DMTaiSanCoDinh dinh = new Rpt_DMTaiSanCoDinh();
                try
                {
                    dinh.SetDataSource(dataTable);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        dinh.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        dinh.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    dinh.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                    dinh.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                    dinh.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    dinh.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    dinh.SetParameterValue(5, modGeneral.Tranlated("T\x00c0I SẢN CỐ ĐỊNH", ""));
                    dinh.SetParameterValue(6, modGeneral.Tranlated("M\x00e3 t\x00e0i sản cố định", ""));
                    dinh.SetParameterValue(7, modGeneral.Tranlated("T\x00ean t\x00e0i sản cố định", ""));
                    dinh.SetParameterValue(8, modGeneral.Tranlated("Năm sản xuất", ""));
                    dinh.SetParameterValue(9, modGeneral.Tranlated("Thời gian bảo h\x00e0nh", ""));
                    dinh.SetParameterValue(10, modGeneral.Tranlated("Ng\x00e0y mua", ""));
                    dinh.SetParameterValue(11, modGeneral.Tranlated("Loại tiền", ""));
                    dinh.SetParameterValue(12, modGeneral.Tranlated("Tỷ gi\x00e1", ""));
                    dinh.SetParameterValue(13, modGeneral.Tranlated("Nguy\x00ean gi\x00e1 NT", ""));
                    dinh.SetParameterValue(14, modGeneral.Tranlated("Nguy\x00ean gi\x00e1", ""));
                    dinh.SetParameterValue(15, modGeneral.Tranlated("Đ\x00e3 khấu hao", ""));
                    dinh.SetParameterValue(0x10, modGeneral.Tranlated("Gi\x00e1 trị c\x00f2n lại", ""));
                    dinh.SetParameterValue(0x11, modGeneral.Tranlated("Thời gian sử dụng", ""));
                    dinh.SetParameterValue(0x12, modGeneral.Tranlated("Trị gi\x00e1 khấu hao", ""));
                    dinh.SetParameterValue(0x13, modGeneral.Tranlated("Năm th\x00e1ng t\x00ednh khấu hao ", ""));
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = dinh;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        private void CmdRefresh_Click(object sender, EventArgs e)
        {
            this.LoadData();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_SearchTaiSanCoDinh_Load(object sender, EventArgs e)
        {
            this.IsLoad = false;
            BuildComboModule.BuildCombo(this.CboLoaiTaiSan, modGeneral.ListDanhMuc.LoaiTaiSan, true, "", "");
            BuildComboModule.BuildCombo(this.CboViTriLoaiTaiSan, modGeneral.ListDanhMuc.ViTri, true, "", "");
            BuildComboModule.BuildCombo(this.CboBophansudung, modGeneral.ListDanhMuc.BoPhan, true, "", "");
            this.IsLoad = true;
            this.LoadData();
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_SearchTaiSanCoDinh));
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdPrint = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.CmdRefresh = new ToolStripButton();
            this.Panel1 = new Panel();
            this.CboLoaiTaiSan = new ComboBox();
            this.CboBophansudung = new ComboBox();
            this.CboViTriLoaiTaiSan = new ComboBox();
            this.Label3 = new Label();
            this.Label2 = new Label();
            this.Label1 = new Label();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.ToolStrip1.SuspendLayout();
            this.Panel1.SuspendLayout();
            this.VSlist.BeginInit();
            this.SuspendLayout();
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp, this.CmdRefresh });
            Point point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            Size size = new Size(0x37e, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0x17;
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x52, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2f, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdExit.Visible = false;
            this.CmdHelp.Alignment = ToolStripItemAlignment.Right;
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.Magenta;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x34, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "&Help";
            this.CmdRefresh.Image = (Image) manager.GetObject("CmdRefresh.Image");
            this.CmdRefresh.ImageTransparentColor = Color.White;
            this.CmdRefresh.Name = "CmdRefresh";
            size = new Size(0x42, 0x16);
            this.CmdRefresh.Size = size;
            this.CmdRefresh.Text = "Refresh";
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CboLoaiTaiSan);
            this.Panel1.Controls.Add(this.CboBophansudung);
            this.Panel1.Controls.Add(this.CboViTriLoaiTaiSan);
            this.Panel1.Controls.Add(this.Label3);
            this.Panel1.Controls.Add(this.Label2);
            this.Panel1.Controls.Add(this.Label1);
            this.Panel1.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x37e, 0x23);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x18;
            this.CboLoaiTaiSan.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTaiSan.FormattingEnabled = true;
            point = new Point(0x4f, 6);
            this.CboLoaiTaiSan.Location = point;
            this.CboLoaiTaiSan.Name = "CboLoaiTaiSan";
            size = new Size(0xac, 0x15);
            this.CboLoaiTaiSan.Size = size;
            this.CboLoaiTaiSan.TabIndex = 5;
            this.CboBophansudung.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboBophansudung.FormattingEnabled = true;
            point = new Point(0x268, 7);
            this.CboBophansudung.Location = point;
            this.CboBophansudung.Name = "CboBophansudung";
            size = new Size(170, 0x15);
            this.CboBophansudung.Size = size;
            this.CboBophansudung.TabIndex = 4;
            this.CboViTriLoaiTaiSan.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboViTriLoaiTaiSan.FormattingEnabled = true;
            point = new Point(0x152, 7);
            this.CboViTriLoaiTaiSan.Location = point;
            this.CboViTriLoaiTaiSan.Name = "CboViTriLoaiTaiSan";
            size = new Size(0xb6, 0x15);
            this.CboViTriLoaiTaiSan.Size = size;
            this.CboViTriLoaiTaiSan.TabIndex = 3;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x20c, 11);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x58, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 2;
            this.Label3.Text = "Bộ phận sử dụng";
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x101, 11);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x44, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 1;
            this.Label2.Text = "Địa điểm đặt";
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(3, 9);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x3d, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0;
            this.Label1.Text = "Loại t\x00e0i sản";
            this.VSlist.AllowEditing = false;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.None;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 60);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x37e, 0x1fc);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x19;
            this.VSlist.VisualStyle = VisualStyle.Office2007Blue;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37e, 0x238);
            this.ClientSize = size;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.ToolStrip1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_SearchTaiSanCoDinh";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "DANH SACH TAI SAN";
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.VSlist.EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadData()
        {
            if (this.IsLoad)
            {
                string strCondition = "";
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTaiSan.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    if (strCondition.Trim() == "")
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + "  KhoaLoaiTaiSan = '", this.CboLoaiTaiSan.SelectedValue), "'"));
                    }
                    else
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + " KhoaLoaiTaiSan = '", this.CboLoaiTaiSan.SelectedValue), "'"));
                    }
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboViTriLoaiTaiSan.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    if (strCondition.Trim() != "")
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + " AND KhoaDiemDat = '", this.CboViTriLoaiTaiSan.SelectedValue), "'"));
                    }
                    else
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + " KhoaDiemDat = '", this.CboViTriLoaiTaiSan.SelectedValue), "'"));
                    }
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboBophansudung.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    if (strCondition.Trim() != "")
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + " AND KhoaBoPhanSuDung = '", this.CboBophansudung.SelectedValue), "'"));
                    }
                    else
                    {
                        strCondition = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strCondition + " KhoaBoPhanSuDung = '", this.CboBophansudung.SelectedValue), "'"));
                    }
                }
                this.objData = new DataView(this.objSTSCD.GetList(strCondition));
                this.VSlist.DataSource = this.objData;
                this.VSlist.Cols[0].Visible = false;
                this.VSlist.Cols[1].Width = 100;
                this.VSlist.Cols[2].Width = 140;
                this.VSlist.Cols[3].Width = 70;
                this.VSlist.Cols[4].Width = 80;
                this.VSlist.Cols[5].Width = 80;
                this.VSlist.Cols[6].Width = 80;
                this.VSlist.Cols[7].Width = 80;
                this.VSlist[0, 1] = modGeneral.Tranlated("T\x00ean t\x00e0i sản", "");
                this.VSlist[0, 2] = modGeneral.Tranlated("M\x00e3 t\x00e0i sản", "");
                this.VSlist[0, 3] = modGeneral.Tranlated("Năm sản xuất", "");
                this.VSlist[0, 4] = modGeneral.Tranlated("Ng\x00e0y mua", "");
                this.VSlist[0, 5] = modGeneral.Tranlated("Nguy\x00ean gi\x00e1", "");
                this.VSlist[0, 6] = modGeneral.Tranlated("Đ\x00e3 khấu hao", "");
                this.VSlist[0, 7] = modGeneral.Tranlated("C\x00f2n lại", "");
                this.VSlist[0, 8] = modGeneral.Tranlated("M\x00f4 tả", "");
                this.VSlist.Cols[5].DataType = System.Type.GetType("Decimal");
                this.VSlist.Cols[5].Format = modGeneral.H_FORMATNUMBER;
                this.VSlist.Cols[6].DataType = System.Type.GetType("Decimal");
                this.VSlist.Cols[6].Format = modGeneral.H_FORMATNUMBER;
                this.VSlist.Cols[7].DataType = System.Type.GetType("Decimal");
                this.VSlist.Cols[7].Format = modGeneral.H_FORMATNUMBER;
                this.VSlist.Styles.Alternate.BackColor = ProfessionalColors.ToolStripGradientMiddle;
            }
        }

        public void SetLanguage()
        {
            IEnumerator enumerator=null;
            IEnumerator enumerator2 = null;
            try
            {
                enumerator = this.Panel1.Controls.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    object objectValue = RuntimeHelpers.GetObjectValue(enumerator.Current);
                    if (Strings.Left(Conversions.ToString(NewLateBinding.LateGet(objectValue, null, "Name", new object[0], null, null, null)), 3).ToUpper() == "CMD")
                    {
                        NewLateBinding.LateSet(objectValue, null, "Text", new object[] { modGeneral.Tranlated(Conversions.ToString(NewLateBinding.LateGet(objectValue, null, "text", new object[0], null, null, null)), "") }, null, null);
                    }
                    if (Strings.Left(Conversions.ToString(NewLateBinding.LateGet(objectValue, null, "Name", new object[0], null, null, null)), 3).ToUpper() == "LAB")
                    {
                        NewLateBinding.LateSet(objectValue, null, "Text", new object[] { modGeneral.Tranlated(Conversions.ToString(NewLateBinding.LateGet(objectValue, null, "text", new object[0], null, null, null)), "") }, null, null);
                    }
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
            try
            {
                enumerator2 = this.ToolStrip1.Items.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                    object instance = RuntimeHelpers.GetObjectValue(enumerator2.Current);
                    if (Strings.Left(Conversions.ToString(NewLateBinding.LateGet(instance, null, "Name", new object[0], null, null, null)), 3).ToUpper() == "CMD")
                    {
                        NewLateBinding.LateSet(instance, null, "Text", new object[] { modGeneral.Tranlated(Conversions.ToString(NewLateBinding.LateGet(instance, null, "text", new object[0], null, null, null)), "") }, null, null);
                    }
                    if (Strings.Left(Conversions.ToString(NewLateBinding.LateGet(instance, null, "Name", new object[0], null, null, null)), 3).ToUpper() == "LAB")
                    {
                        NewLateBinding.LateSet(instance, null, "Text", new object[] { modGeneral.Tranlated(Conversions.ToString(NewLateBinding.LateGet(instance, null, "text", new object[0], null, null, null)), "") }, null, null);
                    }
                }
            }
            finally
            {
                if (enumerator2 is IDisposable)
                {
                    (enumerator2 as IDisposable).Dispose();
                }
            }
            this.Text = modGeneral.Tranlated(this.Text, "");
            LVYModule.SetTitleGrid(this.VSlist);
        }

        public void setUserRight()
        {
            this.CmdAdd.Enabled = this.mAllowEdit;
            this.CmdEdit.Enabled = this.mAllowEdit;
            this.CmdDel.Enabled = this.mAllowDel;
        }

        private void VSlist_DoubleClick(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                if (Conversions.ToBoolean(this.objFrmSoDuDauKy))
                {
                    MyProject.Forms.Frm_SoDuDauKyTaiSan.Dispose();
                    MyProject.Forms.Frm_SoDuDauKyTaiSan.cFrmKhoa = Conversions.ToString(this.VSlist[this.VSlist.Row, 0]);
                    MyProject.Forms.Frm_SoDuDauKyTaiSan.cFrmNamThang = this.pNamThang;
                    MyProject.Forms.Frm_SoDuDauKyTaiSan.ShowDialog();
                }
                else if (this.objFrmCall == null)
                {
                    MyProject.Forms.Frm_TaiSan.Dispose();
                    MyProject.Forms.Frm_TaiSan.cFrmKhoa = Conversions.ToString(this.VSlist[this.VSlist.Row, 0]);
                    MyProject.Forms.Frm_TaiSan.ShowDialog();
                }
                else
                {
                    object[] objArray = new object[1];
                    C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                    int row = this.VSlist.Row;
                    int num2 = 0;
                    objArray[0] = RuntimeHelpers.GetObjectValue(vSlist[row, num2]);
                    object[] arguments = objArray;
                    bool[] copyBack = new bool[] { true };
                    NewLateBinding.LateCall(this.objFrmCall, null, "InsertFixedAsset", arguments, null, null, copyBack, true);
                    if (copyBack[0])
                    {
                        vSlist[row, num2] = RuntimeHelpers.GetObjectValue(arguments[0]);
                    }
                    this.Dispose();
                }
            }
        }

        internal virtual ComboBox CboBophansudung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboBophansudung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboBophansudung_SelectedIndexChanged);
                if (this._CboBophansudung != null)
                {
                    this._CboBophansudung.SelectedIndexChanged -= handler;
                }
                this._CboBophansudung = value;
                if (this._CboBophansudung != null)
                {
                    this._CboBophansudung.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboLoaiTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTaiSan_SelectedIndexChanged);
                if (this._CboLoaiTaiSan != null)
                {
                    this._CboLoaiTaiSan.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTaiSan = value;
                if (this._CboLoaiTaiSan != null)
                {
                    this._CboLoaiTaiSan.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboViTriLoaiTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboViTriLoaiTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboViTriLoaiTaiSan_SelectedIndexChanged);
                if (this._CboViTriLoaiTaiSan != null)
                {
                    this._CboViTriLoaiTaiSan.SelectedIndexChanged -= handler;
                }
                this._CboViTriLoaiTaiSan = value;
                if (this._CboViTriLoaiTaiSan != null)
                {
                    this._CboViTriLoaiTaiSan.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdEdit = value;
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdExit = value;
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdHelp = value;
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdPrint_Click);
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click -= handler;
                }
                this._CmdPrint = value;
                if (this._CmdPrint != null)
                {
                    this._CmdPrint.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdRefresh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdRefresh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdRefresh_Click);
                if (this._CmdRefresh != null)
                {
                    this._CmdRefresh.Click -= handler;
                }
                this._CmdRefresh = value;
                if (this._CmdRefresh != null)
                {
                    this._CmdRefresh.Click += handler;
                }
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.VSlist_DoubleClick);
                if (this._VSlist != null)
                {
                    this._VSlist.DoubleClick -= handler;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.DoubleClick += handler;
                }
            }
        }
    }
}

